package org.lcb.demo.shiyan3.handler;

import org.lcb.demo.shiyan3.result.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class RestControllerHandlers {
    @ExceptionHandler(Exception.class)
    public Result HandlerException(Exception e){


        System.out.println(e);
        return Result.error(e.getMessage());
    }

}